package org.example.sping02.config;

import org.example.sping02.entity.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class userConfig {

    @Bean("u1")
    public User user1() {
        // 创建对象
        User user = new User();
        user.setId(1);
        user.setName("小B");
        user.setAge(18);
        return user;

    }
}
